package com.ruoyi.pyo.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.pyo.mapper.PetYeahPetArchiveMapper;
import com.ruoyi.pyo.domain.PetYeahPetArchive;
import com.ruoyi.pyo.service.IPetYeahPetArchiveService;

/**
 * 宠物档案Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-11-19
 */
@Service
public class PetYeahPetArchiveServiceImpl implements IPetYeahPetArchiveService 
{
    @Autowired
    private PetYeahPetArchiveMapper petYeahPetArchiveMapper;

    /**
     * 查询宠物档案
     * 
     * @param id 宠物档案主键
     * @return 宠物档案
     */
    @Override
    public PetYeahPetArchive selectPetYeahPetArchiveById(Long id)
    {
        return petYeahPetArchiveMapper.selectPetYeahPetArchiveById(id);
    }

    /**
     * 查询宠物档案列表
     * 
     * @param petYeahPetArchive 宠物档案
     * @return 宠物档案
     */
    @Override
    public List<PetYeahPetArchive> selectPetYeahPetArchiveList(PetYeahPetArchive petYeahPetArchive)
    {
        return petYeahPetArchiveMapper.selectPetYeahPetArchiveList(petYeahPetArchive);
    }

    /**
     * 新增宠物档案
     * 
     * @param petYeahPetArchive 宠物档案
     * @return 结果
     */
    @Override
    public int insertPetYeahPetArchive(PetYeahPetArchive petYeahPetArchive)
    {
        petYeahPetArchive.setCreateTime(DateUtils.getNowDate());
        return petYeahPetArchiveMapper.insertPetYeahPetArchive(petYeahPetArchive);
    }

    /**
     * 修改宠物档案
     * 
     * @param petYeahPetArchive 宠物档案
     * @return 结果
     */
    @Override
    public int updatePetYeahPetArchive(PetYeahPetArchive petYeahPetArchive)
    {
        petYeahPetArchive.setUpdateTime(DateUtils.getNowDate());
        return petYeahPetArchiveMapper.updatePetYeahPetArchive(petYeahPetArchive);
    }

    /**
     * 批量删除宠物档案
     * 
     * @param ids 需要删除的宠物档案主键
     * @return 结果
     */
    @Override
    public int deletePetYeahPetArchiveByIds(Long[] ids)
    {
        return petYeahPetArchiveMapper.deletePetYeahPetArchiveByIds(ids);
    }

    /**
     * 删除宠物档案信息
     * 
     * @param id 宠物档案主键
     * @return 结果
     */
    @Override
    public int deletePetYeahPetArchiveById(Long id)
    {
        return petYeahPetArchiveMapper.deletePetYeahPetArchiveById(id);
    }
}
